<template>
    <div>
        <el-card class="ep-card ep-search">
            <el-form :model="searchForm" label-width="80px">
                <el-row :gutter="20">
                    <el-col :span="9">
                        <el-form-item label="客户名称" size="small"> 
                            <el-input v-model="searchForm.entName"  placeholder="请输入客户名称"></el-input>
                        </el-form-item>
                    </el-col>
                  <el-col :span="9">
                    <el-button type="primary" size="small" icon="el-icon-search" @click="getList">查询</el-button>
                    <el-button type="primary" size="small" icon="el-icon-plus" @click="addEntBase">新增</el-button>
                    <!-- <el-button type="danger" icon="el-icon-remove" @click="deleteByIds">删除</el-button> -->
                  </el-col>
                </el-row>
            </el-form>
        </el-card>
        <el-card class="ep-card" style="height: calc(100vh - 280px);">
            <el-row style="margin-top: 10px;">
                <el-table
                    :data="tableData"
                    size="mini"
                    border
                    :height="height"  @selection-change="handleSelectionChange"
                    style="width: 100%">
                    <el-table-column
                        type="selection"
                        width="50"
                        fixed
                       >
                    </el-table-column>
                    <el-table-column
                        type="index"
                        label="序号"
                        fixed
                        align="center"
                        width="50">
                    </el-table-column>
                    <el-table-column
                        prop="entNo"
                        align="center"
                        width="180"
                        label="客户编码">
                    </el-table-column>
                    <el-table-column
                        prop="entName"
                        align="center"
                        width="180"
                        show-overflow-tooltip
                        label="客户名称">
                    </el-table-column>
                    <el-table-column
                        prop="peoName"
                        align="center"
                        width="180"
                        show-overflow-tooltip
                        label="法定代表人">
                    </el-table-column>
                    <el-table-column
                        prop="telephone"
                        align="center"
                        width="180"
                        show-overflow-tooltip
                        label="联系电话">
                    </el-table-column>
                    <el-table-column
                        prop="createUserName"
                        align="center"
                        width="180"
                        show-overflow-tooltip
                        label="创建人">
                    </el-table-column>
                    <el-table-column
                        :formatter="dateFormatter"
                        prop="createTime"
                        align="center"
                        width="180"
                        show-overflow-tooltip
                        label="创建时间">
                    </el-table-column>
                    <el-table-column
                        prop="name"
                        align="center"
                        fixed="right"
                        label="操作"
                        width="180">
                        <template slot-scope="scope">
                            <el-button type="text" @click="view(scope.row)">查看</el-button>
                            <el-button type="text" @click="edit(scope.row)">修改</el-button>
                          <!--  <el-button type="text" @click="delete(scope.row.id)">删除</el-button>-->
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination
                    v-show="tableData.length > 0"
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="pager.page"
                    background
                    :page-sizes="[20, 40, 60, 80]"
                    :page-size="pager.size"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="pager.total">
                </el-pagination>
            </el-row>
        </el-card>
    </div>
</template>
<script src="@/pages/biz/ent/js/entBaseList.js"></script>
